home *** CD-ROM | disk | FTP | other *** search
/ L' Effet Pommier 3 / L'Effet Pommier - Volume 03.iso / Graphismes / 3D / POV-Ray 3.0B5a PPC / POV-Ray 3.0B5a / POVSCN.Scenes / POV3DEMO / OTHER / SWITCH1.POV < prev    next >
Text File  |  1995-11-08  |  1KB  |  45 lines

  1. // Persistence Of Vision raytracer version 3.0 sample file.
  2. // Demonstrates #switch and #case directives
  3. //
  4. // If +k0 you get red pigment with phong finish, then it falls
  5. //   through to #case(1) because there is no #break.  This adds
  6. //   the normal bumps.
  7. // If +k1 you get a red pigment with the bumps from #case(1)
  8. //   but you do not get the phong.
  9. // If +k2 the red pigment is overriden with blue.  No bumps or phong.
  10. // If +k3 the red pigment is overriden with green.  No bumps or phong.
  11. // If any other clock value is used, you get red pigment.  No bumps or phong.
  12.  
  13. #version 3.0
  14. global_settings { assumed_gamma 2.2 }
  15.  
  16. #include "colors.inc"
  17.  
  18. camera {
  19.    location  <0, 20,-100>
  20. }
  21.  
  22. plane { y, -10
  23.    pigment {White}
  24.    finish {ambient 0.2 diffuse 0.8}
  25. }
  26.  
  27. sphere { <0, 25, 0>, 40
  28.    pigment {Red}
  29.    #switch (clock)
  30.      #case (0)
  31.        finish{phong 1}
  32.      #case (1)
  33.        normal{bumps 1 scale 5}
  34.        #break
  35.      #case (2)
  36.        pigment{Blue}
  37.        #break
  38.      #case (3)
  39.        pigment {Green}
  40.    #end
  41. }
  42.  
  43. light_source {<100, 120, -200> colour White}
  44.  
  45.